<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<!-- 模板语法 - 指令 -->
			<p v-if="seen">现在你看到我了</p>
			<a v-bind:href="url">baidu</a>
			<div @click="click1">
				<div @click="click2">
					click me
				</div>
			</div>
			<div @click="click3">
				<!-- .stop 不会触发父元素 -->
				<div @click.stop="click4">
					click you
				</div>
			</div>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el: "#app",
				data: {
					seen: true,
					url: "http://wwww.baidu.com"
				},
				methods:{
					click1: function() {
						console.log("click1...")
					},
					click2: function() {
						console.log("click2...")
					},
					click3: function() {
						console.log("click3...")
					},
					click4: function() {
						console.log("click4...")
					}
				}
			});
		</script>
	</body>
</html>
